From b7a8bde89581fa1d9aa800828c1347fdb4507aa7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 15 Jul 2014 14:41:04 -0400 Subject: [PATCH] gtkwindow: Fix the comment for an optimization The optimization was incorrect, and so it was changed in commit 2bf6824, but the comment to go along with it was never updated. --- gtk/gtkwindow.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index f764bb88bb..76608d355c 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7155,13 +7155,14 @@ gtk_window_configure_event (GtkWidget *widget, priv->configure_request_count -= 1; gdk_window_thaw_toplevel_updates_libgtk_only (gtk_widget_get_window (widget)); } - - /* As an optimization, we avoid a resize when possible. + + /* If this is a gratuitous ConfigureNotify that's already + * the same as our allocation, then we can fizzle it out. + * This is the case for dragging windows around. * - * The only times we can avoid a resize are: - * - we know only the position changed, not the size - * - we know we have made more requests and so will get more - * notifies and can wait to resize when we get them + * We can't do this for a ConfigureRequest, since it might + * have been a queued resize from child widgets, and so we + * need to reallocate our children in case *they* changed. */ gtk_widget_get_allocation (widget, &allocation); if (!expected_reply && -- 2.30.2